<?php
$func = function ($name) {
    echo $name . PHP_EOL;
};

function A($fn)
{
    return function ($param) use ($fn) {
        $param = "sb_" . $param;
        return $fn($param);
    };
}

function B($fn)
{
    return function ($param) use ($fn) {
        $param = "123_" . $param;
        return $fn($param);
    };
}

A($func)("wsk");
B($func)("wsk");


class Me
{
    function show($name)
    {
        echo $name . PHP_EOL;
    }
}

$reflect = new ReflectionClass("Me");
$method = $reflect->getMethod("show");
//反射方法
$method->invoke(new Me(), "wskyygyso");
//反射闭包方法
A($method->getClosure(new Me()))("wskyygyso");
